package variabilitysmelldetection.measurement.measures.spl;

import java.util.List;

import variabilitysmelldetection.measurement.measures.Measure;
import variabilitysmelldetection.measurement.models.ComponentItem;



public class NumberOfConstants extends Measure {

	public NumberOfConstants() {
		super("Number of Constants", "NOCt");
	}

	@Override
	public void measure(List<ComponentItem> items) {
		int noc = 0;
		for (ComponentItem c : items) {
			if (!c.isRefinement()) {
				noc++;
			}
		}
		setValue(noc);
	}
}